body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

.chat-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 40px; /* 为输入区域预留空间 */
    /* background-image: url("bg.jpg");*/
    /* background-color: red; */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 2;
}

.chat-content {
    position: absolute;
    top: 50%;
    bottom: 0;
    width: calc(100% - 40px); /* 减去左右内边距各20px */
    padding: 20px 20px 0;
    overflow-y: auto;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.6) 100%);
    z-index: 3;
}

.message {
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    max-width: 70%;
}

.sender {
    background-color: rgba(220, 248, 198, 0.4); /* 半透明背景 */
    background-color: #DCF8C6;
    float: right;
    clear: both;
}

.receiver {
    background-color: rgba(224, 234, 244, 0.4); /* 半透明背景 */
    float: left;
    clear: both;
}

.input-area {
    position: fixed;
    bottom: 0;
    width: calc(100% - 10px);
    padding: 5px;
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

input[type="text"] {
    flex-grow: 0.9;
    padding: 10px;
    border: 1px solid #fcfcfc;
    border-radius: 5px;
}

button {
    flex-grow: 0.08;
    padding: 10px 10px;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    cursor: pointer;
}